<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>注册成功,<h1>5</h1>秒后进行跳转</p>
    <script>
        setInterval(() => {
            let h1=document.querySelector("h1")
            h1.innerHTML -=1

            if(h1.innerHTML == 0){
                location.href = "http://www.baidu.com"
            }
        }, 1000);

    </script>

</body>
</html>